<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>系统</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="../../lib/layui-v2.6.3/css/layui.css" media="all">
    <link rel="stylesheet" href="../../css/public.css" media="all">
    <style>
        body {
            background-color: #ffffff;
        }
    </style>
</head>
<body>
    <script type="text/html" id="status">
        <input type="checkbox" disabled=""  name="status" value="{{d.id}}" lay-skin="switch" lay-text="开启|关闭" lay-filter="status" {{ d.status == 1 ? 'checked' : '' }}>
    </script>
    
    <table class="layui-hide" id="currentTableId" lay-filter="currentTableFilter"></table>
<script src="../../lib/layui-v2.6.3/layui.js" charset="utf-8"></script>
<script src="../../js/lay-config.js" charset="utf-8"></script>
<script>
    layui.use(['form','http','table','tableSelect'], function () {
        var form = layui.form,
            layer = layui.layer,
            http  = layui.http,
            apiurl =http.api,
            table = layui.table,
            tableSelect = layui.tableSelect,
            $ = layui.$;
            http.verifyToken();
            var id  = http.getQueryString('id');
            table.render({
                elem: '#currentTableId',
                url: apiurl+'Personal/projecttableList',
                toolbar: '#toolbarDemo',
                defaultToolbar: ['filter', 'exports', 'print', {
                    title: '提示',
                    layEvent: 'LAYTABLE_TIPS',
                    icon: 'layui-icon-tips'
                }],
                cols: [[
                    {type: "checkbox"},
                    {field: 'id', title: 'ID', sort: true},
                    {field: 'title', title: '标题'},
                    {field: 'name', title: '数据表名'},
                    {field: 'status', title: '状态',toolbar: '#status'},
                    {field: 'create_time', title: '创建时间'},
                    // {title: '操作',minWidth: 280,toolbar: '#currentTableBar', align: "center"}
                ]],
                where: {"project_id":id},
                headers: { //通过 request 头传递
                    Authorization:  layui.data(http.token)['token']
                },
                limits: [10, 15, 20, 25, 50, 100],
                limit: 15,
                page: true,
                skin: 'line'
            });
    });
    
</script>
</body>
</html>